﻿using Microsoft.Xna.Framework;
using Rvz.Game.Main.Entities.Robots;
using Rvz.Game.Main.State;

namespace Rvz.Game.Main.Entities.Zombies.States
{
    public class RobotCollisionState : ZombieStateBase
    {
        private readonly Robot _robot;

        public RobotCollisionState(Robot robot)
        {
            _robot = robot;
        }

        public override void ProcessState(Zombie sender, GameState gameState)
        {
            sender.CollisionShape.CollideAgainstMove(_robot.CollisionShape, .1f, .5f);
            sender.CollisionShape.Color = Color.Red;
            sender.AttackRobot(_robot);
        }
    }
}
